import { importAll } from '../src/utils/util';

const modules = importAll(require.context('./', false, /^(?!.*(?:index.js$)).*\.js$/), 'object');
const apiRoutes = Object.values(modules).reduce((prev, cur) => {
  return {
    ...prev,
    ...cur,
  };
}, {});

export default {
  ...apiRoutes,
};
